<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});

Route::auth();

Route::get('/home', 'HomeController@index');

//后台的内容
Route::group(['namespace'=>'Admin','prefix'=>'admin','middleware'=>'auth:admin'],function($router){
    //这里是权限管理
    Route::resource('permission','PermissionController');
    //这里是角色管理
    Route::resource('role','RoleController');
});
require(__DIR__.'/admin/admin.php');



